package gang.com.twoshopping.adapter;

import android.content.Context;
import android.net.Uri;

import com.facebook.drawee.view.SimpleDraweeView;

import java.util.List;

import gang.com.twoshopping.R;
import gang.com.twoshopping.bean.HomeCategory;
import gang.com.twoshopping.bean.Wares;

/**
 * Created by xiaogangzai on 2017/5/23.
 */

public class HOTAdapter extends BaseSimpleAdapter<Wares> {
    //这时候这里面的布局文件就不需要再传递了
    public HOTAdapter(Context context, List<Wares> dates) {
        super(context, dates, R.layout.template_hot_wares);
    }

    @Override
    public void bindData(BaseViewHolder viewHolder, Wares wares) {
       viewHolder.getTextView(R.id.fragment_hot_text_title).setText(wares.getName());
        //Uri uri = Uri.parse(wares.getImgUrl());
       // SimpleDraweeView fragment_hot_img=(SimpleDraweeView)viewHolder.getTextView(R.id.fragment_hot_img).setImageURI(uri);
       // viewHolder.getImageView(R.id.fragment_hot_img).setImageURI(uri);
        viewHolder.getTextView(R.id.fragment_hot_text_price).setText(wares.getPrice()+"元");
    }
}
